package com.reform.controller.phase;


import com.reform.res.Result;
import com.reform.service.IPhaseCheckService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLException;

/**
 * <p>
 * 阶段检查项目表 前端控制器
 * </p>
 *
 * @author mortale
 * @since 2021-10-11
 */
@RestController
@RequestMapping("/phase-check")
@Api(tags = "PhaseCheckController")
public class PhaseCheckController {

    @Autowired
    IPhaseCheckService phaseCheckService;

    @ApiOperation(value = "更改阶段状态")
    @PostMapping("/updatePhaseStatus")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "proId", value = "项目id", paramType = "query", dataTypeClass = String.class, required = true),
            @ApiImplicitParam(name = "phaseId", value = "阶段id", paramType = "query", dataTypeClass = String.class, required = true),
    })
    public Result updatePhaseStatus(String proId, String phaseId) throws SQLException {
        return phaseCheckService.updatePhaseStatus(proId, phaseId);
    }
}
